package com.fypg.module.medical.dal.mysql.outpatientorderrefund;

import java.util.*;

import com.fypg.framework.common.pojo.PageResult;
import com.fypg.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.fypg.framework.mybatis.core.mapper.BaseMapperX;
import com.fypg.module.medical.dal.dataobject.outpatientorderrefund.OutpatientOrderRefundDO;
import org.apache.ibatis.annotations.Mapper;
import com.fypg.module.medical.controller.admin.outpatientorderrefund.vo.*;

/**
 * 门诊订单退款信息 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface OutpatientOrderRefundMapper extends BaseMapperX<OutpatientOrderRefundDO> {

    default PageResult<OutpatientOrderRefundDO> selectPage(OutpatientOrderRefundPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OutpatientOrderRefundDO>()
                .eqIfPresent(OutpatientOrderRefundDO::getOutpatientOrderId, reqVO.getOutpatientOrderId())
                .eqIfPresent(OutpatientOrderRefundDO::getPlatformRefundOrderNo, reqVO.getPlatformRefundOrderNo())
                .eqIfPresent(OutpatientOrderRefundDO::getPayRefundTradeNo, reqVO.getPayRefundTradeNo())
                .eqIfPresent(OutpatientOrderRefundDO::getHisRefundOrderNo, reqVO.getHisRefundOrderNo())
                .eqIfPresent(OutpatientOrderRefundDO::getRefundReason, reqVO.getRefundReason())
                .eqIfPresent(OutpatientOrderRefundDO::getRefundFee, reqVO.getRefundFee())
                .betweenIfPresent(OutpatientOrderRefundDO::getRefundTime, reqVO.getRefundTime())
                .eqIfPresent(OutpatientOrderRefundDO::getRefundStatus, reqVO.getRefundStatus())
                .eqIfPresent(OutpatientOrderRefundDO::getRefundChannel, reqVO.getRefundChannel())
                .eqIfPresent(OutpatientOrderRefundDO::getExtendData, reqVO.getExtendData())
                .eqIfPresent(OutpatientOrderRefundDO::getSortCode, reqVO.getSortCode())
                .eqIfPresent(OutpatientOrderRefundDO::getEnabledMark, reqVO.getEnabledMark())
                .eqIfPresent(OutpatientOrderRefundDO::getDescription, reqVO.getDescription())
                .eqIfPresent(OutpatientOrderRefundDO::getRemark, reqVO.getRemark())
                .betweenIfPresent(OutpatientOrderRefundDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(OutpatientOrderRefundDO::getId));
    }

}